package com.heaven.controller;

import com.heaven.annotation.beans.Student;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/index")
public class IndexController {
    @ResponseBody
    @RequestMapping(method = RequestMethod.GET)
    public Student home(Student re_stu){
        System.out.println(re_stu.toString());
        Student stu = new Student(10, "Tom", "123456");
        return stu;
    }
}
